// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import './utils/polyfill'
import router from './router'
import store from './store'
import './directives'
import './assets/iconfont/iconfont.css'
import './mint-ui'
import './mint-ui/style.min.css'
import './mint-ui/index.scss'
import './components/global'
import * as EUI from './e-ui'
import './e-ui/index.scss'
import './vx-ui/index.scss'
import './styles/index.scss'

Vue.config.productionTip = false

Vue.use(EUI)
// register global utility filters.

/*
页面进度条控制
*/
router.beforeEach((to, from, next) => {
  store.commit('LOADING', true)
  next()
})
router.afterEach(() => {
  store.loader.timer = setTimeout(() => {
    store.commit('LOADING', false)
  }, 200)
  store.loader.onComplete = () => {
    store.commit('LOADING', false)
  }
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
